
#ifdef  USE_AIR720

typedef struct{

	uint8_t FirstSendFlag;
	uint8_t ConnectSFlag;
	uint8_t ReturnSFlag;
	uint8_t StatusFinishFlag;
	uint8_t  ForceSendFlag;
}NETCOMM;



#define BUFLEN 255


#define SIM_OK 0
#define SIM_COMMUNTION_ERR 0xff
#define SIM_CPIN_ERR 0xfe
#define SIM_CREG_FAIL 0xfd
#define SIM_MAKE_CALL_ERR 0Xfc
#define SIM_ATA_ERR       0xfb

#define MAX_MQTT_BUFFER 800

#define PARACOUNT  60

#define PROPERTYCOUNT  74

//#define  EVENTCOUNT 672

#define CONNECT_OK  30


#define STATUS    0
#define PROPERTY  1

#define EVENT  2

#define BIT0 (1<<0)
#define BIT1 (1<<1)
#define BIT2 (1<<2)
#define BIT3 (1<<3)
#define BIT4 (1<<4)
#define BIT5 (1<<5)
#define BIT6 (1<<6)
#define BIT7 (1<<7)
#define BIT8 (1<<8)
#define BIT9 (1<<9)
#define BIT10 (1<<10)
#define BIT11 (1<<11)
#define BIT12 (1<<12)
#define BIT13 (1<<13)
#define BIT14 (1<<14)
#define BIT15 (1<<15)

extern char UpdateMd5[33];

extern u8 Air720_INIT(void);
extern u8 Air720_CONNECT_NET(void);
extern u8 Air720_CONNECT_SERVER(void);
//extern  u8 Air720_CONNECT_SERVER_CFG_INFOR(u8 *PRODUCTKEY,u8 *DEVICENAME,u8 *DEVICESECRET,u8 *S1,u8 *S2,u8 *S3);
extern u8 Air720_MQTT_SEND_AUTO(u8 *PRODUCTKEY,u8 *DEVICENAME);

extern u8 Air720_MQTT_Service(	void	);
extern void check_cmd(void);

extern u8 GetNetTimer(u8 index);
extern u8 GetNetTimer(u8 index);

extern u8 Get_4GSignalStrenth(void);
extern u8 Get_4G_State(void);

extern u16 Get_UpdateTimer(void);


extern void Set_UpdateTimer(u16 value);



#else
typedef struct{

	uint8_t First03SendFlag;
	uint8_t ConnectSFlag;
	uint8_t ReturnSFlag;
	uint8_t StatusFinishFlag;
	uint8_t  ForceSendFlag;
	uint8_t  SlaveNum;
	uint8_t  First02SendFlag;
	uint8_t StatusFinish02Flag;
	uint8_t GetwayStatus;
	uint8_t GateSetFlag;
	uint8_t GateRebootFlag;
	
}NETCOMM;


typedef struct
{
	uint8_t	index;
	uint8_t	value;
	
}ALARM_RECORD;


#define BUFLEN 255


#define SIM_OK 0
#define SIM_COMMUNTION_ERR 0xff
#define SIM_CPIN_ERR 0xfe
#define SIM_CREG_FAIL 0xfd
#define SIM_MAKE_CALL_ERR 0Xfc
#define SIM_ATA_ERR       0xfb

#define MAX_MQTT_BUFFER 1280

#define PARACOUNT  57

#define PROPERTYCOUNT  74

//#define  EVENTCOUNT 672

#define CONNECT_OK  30


#define STATUS    0
#define PROPERTY  1

#define DISCRETE  2


#define EVENT  2

#define MAX_04_LIST    30
#define MAX_02_LIST    60

#define STATUS02_ALARM_SLAVE_START   8

#define STATUS02_ALARM_SLAVE_END   43

#define STATUS02_ALARM_SLAVE_EX1   44
#define STATUS02_ALARM_SLAVE_EX2   45
#define STATUS02_ALARM_SLAVE_EX3   46

#define SLAVE04_REGNUM    30

#define BIT0 (1<<0)
#define BIT1 (1<<1)
#define BIT2 (1<<2)
#define BIT3 (1<<3)
#define BIT4 (1<<4)
#define BIT5 (1<<5)
#define BIT6 (1<<6)
#define BIT7 (1<<7)
#define BIT8 (1<<8)
#define BIT9 (1<<9)
#define BIT10 (1<<10)
#define BIT11 (1<<11)
#define BIT12 (1<<12)
#define BIT13 (1<<13)
#define BIT14 (1<<14)
#define BIT15 (1<<15)

extern char UpdateMd5[33];

extern u8 Air720_INIT(void);
extern u8 Air720_CONNECT_NET(void);
extern u8 Air720_CONNECT_SERVER(void);
//extern  u8 Air720_CONNECT_SERVER_CFG_INFOR(u8 *PRODUCTKEY,u8 *DEVICENAME,u8 *DEVICESECRET,u8 *S1,u8 *S2,u8 *S3);
extern u8 Air720_MQTT_SEND_AUTO(u8 *PRODUCTKEY,u8 *DEVICENAME);

extern u8 Air720_MQTT_Service(	void	);
extern void check_cmd(void);

extern u8 GetNetTimer(u8 index);

extern u8 Get_4GSignalStrenth(void);
extern u8 Get_4G_State(void);


extern u16 Get_UpdateTimer(void);


extern void Set_UpdateTimer(u16 value);


  #endif
  
  
